<link href="http://demo.swfupload.org/v220/css/default.css" />
<style>
    td{padding:5px;}
    table th{text-align:right}
    table li{float:left;margin-right:30px;}
</style>
<div class="center">
	<div class="home">
    	<div class="home_left">
        	<?php echo $this->partial('tuan/menu.phtml',array('uCount' => $this->uCount,'menuId'=>$this->menuId,'user'=>$this->user)); ?>
        </div>
        <div class="home_right">
    <div class="fill">
        <form  method="post">
        <table style="border:1px solid #000;width:90%">
            <caption>帐户操作</caption>
            <tr>
                <th>用户信息</th>
                <td><span style="color:green" id="userinfo">用户名：<?= $this->user->Email ?>  用户ID:<?= $this->user->Id ?>   余额:<?= $this->user->Account->Money ?></span></td>
            </tr>
            <tr>
                <th>扣除金额：</th>
                <td><?= $this->formText('money',null,array('class'=>'required number')) ?></td>
            </tr>
            <tr>
                <th>原因</th>
                <td><?= $this->formText('comment',null,array('class'=>'required')) ?></td>
            </tr>            
            
            <tr>
                <th></td>
                <td><input type="submit" value="  提   交  "/></td>
            </tr>
            
        </table>
            </form>
    </div>
</div>
</div>
<script>
$(function(){
    $('#storeno').change(function(){
        $.post('/tuan/userinfo', {'storeno':$(this).val()}, function(data){
            if(!data){
                $('#userinfo').text('没有找到该仓库号对应的用户信息');
                alert('没有找到该仓库号对应的用户信息,请检查仓库号是否输入正确');
                $('#storeno').focus();
                return;
            }
            $('#userid').val(data.userid);
            $('#userinfo').text('帐号:'+data.email+' 用户ID：'+data.userid)
        }, 'json');
    });
    $('form').validate();
   
});
</script>
